import {getDailyWord} from "@/api/word";

export default {
  namespaced: true,
  state() {
    return {
      dailyWord: []
    }
  },
  actions: {
    getDailyWord(context) {
      getDailyWord().then(res => {
        context.commit('getDailyWord',res.data.data)
      }).catch(err => {

      })
    }
  },
  mutations: {
    getDailyWord(state,data) {
      state.dailyWord = data
    }
  },
  getters: {
    dailyWord: state => state.dailyWord
  }
}
